        <!-- 顶部信息 -->
        {include file='common/nav'/}
        <!--菜单-->
            {include file='common/top'/}
            </div>
        </div>
        <!-- 菜单结束-->
    
        <!-- 主体部分和顶部-->
        {include file='common/main'/}
        <!--页面-->
        <div class="wrapper">
            <div class="row">
               <div class="col-sm-12">
               <section class="panel">
               <header class="panel-heading">
                   直播列表
                   <span class="tools pull-right">
                       <a href="javascript:;" class="fa fa-chevron-down"></a>
                       <a href="javascript:;" class="fa fa-times"></a>
                    </span>
               </header>
               <div class="panel-body">
               <div class="adv-table editable-table ">
               <div class="clearfix">
                   <div class="btn-group">
                       <button id="editable-sample_new" class="btn btn-primary">
                        <a href="{:url('index/add')}">新增 <i class="fa fa-plus" href="www"></i></a>
                       </button>
                   </div>
                   <div class="btn-group pull-right">
                       <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">工具 <i class="fa fa-angle-down"></i>
                       </button>
                       <ul class="dropdown-menu pull-right">
                           <li><a href="#">打印</a></li>
                           <li><a href="#">保存至PDF</a></li>
                           <li><a href="#">导出Excel</a></li>
                       </ul>
                   </div>
               </div>
               <div class="space15"></div>
               <table class="table table-striped table-hover table-bordered" id="editable-sample">
               <thead>
               <tr>
                   <th>ID</th>
                   <th>主场球队</th>
                   <th>客场球队</th>
                   <th>比赛时间</th>
                   <th>编辑</th>
                   <th>删除</th>
               </tr>
               </thead>
               <tbody>
                   {foreach $list as $key => $vo}
               <tr class="">
                   <td>{$vo.id}</td>
                   <td>{$vo.cluba}</td>
                   <td>{$vo.clubb}</td>
                   <td class="center">{$vo.live_time|date="Y-m-d"}</td>
                   <td><a class="edit"  href="{:url('index/edit',['id'=>$vo['id']])}">编辑</a></td>
                   <td><a class="delete" del_id="{$vo.id}" href="javascript:;">删除</a></td>
               </tr>
               {/foreach}
               </tbody>
               </table>
               </div>
               </div>
               </section>
               </div>
               </div>
        </div>
        <!--页面结束-->
        
        <!--底部内容-->
        {include file='common/bottom'/}
        <script>
            $('.delete').live('click', function (e) {
                e.preventDefault();
                var del_id = $(this).attr('del_id'); //a标签里的del_id
                console.log(del_id);
                if (confirm("确定要删除吗?") == false) {
                    return;
                }
                $.ajax({
                url: "{:url('admin/index/list')}",    // 提交到controller的url路径
                type: "post",    // 提交方式
                data: {"id": del_id},  // data为String类型，必须为 Key/Value 格式。
                dataType: "json",    // 服务器端返回的数据类型
                success: function (result) {
                    // console.log(result);//打印服务端返回的数据(调试用)
                    if (result.code == 200) {
                        alert("SUCCESS");
                        window.location.reload()
                    }else{
                        alert('删除失败！');
                    }
                },
                })
            });
            
        </script>